#pragma once

#include <vector>
#include "System.h"
#include "Message.h"

class System;

	class MessageHandler
	{
	public:
		MessageHandler(std::vector<System*>* systems);
		void ReceiveMessage(Message* msg); // receive a message from somewhere (system or object)
		~MessageHandler();
	private:
		std::vector<System*>* Systems;  // systems to distribute messages to
	};

	extern MessageHandler* gMsgHandler; // global pointer to message handler

	#define Shout(msg) gMsgHandler->ReceiveMessage(msg) // macro to make sending messages less cumbersome
